<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>上传歌曲</title>
<link rel="icon" href="./icon/ico.ico">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link href="./css/bootstrap.min.css" rel="stylesheet">
</head>

<body>

	<CENTER>

		<form name="form1" enctype="multipart/form-data" method="post"
			action="upLoadAction">
			<div class="from-group">
				<label for="name">歌名</label> <input width="20%" class="form-control"
					style="width: 20%" type=" text" name="name" id="name"
					placeholder="请输入文件名" />
			</div>
			<div class="from-group">
				<label for="play">歌手</label> <input width="20%" class="form-control"
					style="width: 20%" type=" text" name="play" id="play"
					placeholder="请输入歌手" />
			</div>
			<div class="form-group">
				<label for="file">选择文件</label> <input type="file" id="file"
					name="file">
			</div>

			<input class="btn btn-default" style="width: 10%" type="submit"
				width="20%" value="上传文件" />
		</form>
	</CENTER>
	</div>
	<%
		String hint = (String) request.getAttribute("hint");
		if (hint != null) {
			int hint_ = Integer.valueOf(hint);
			if (hint_ == 0) {
	%>
	<script type="text/javascript">
		alert("上传成功");
	</script>
	<%
		} else {
	%>
	<script type="text/javascript">
		alert("上传失败");
	</script>
	<%
		}
		}
	%>
</body>
</html>